<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://paycn.com.cn/pos" prefix="p"%>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<h3 class="page-title">加班</h3>
			<ul class="breadcrumb">
				<li><i class="icon-home"></i> <a
					href="<c:url value="/home.html"/>">首页</a> <i
					class="icon-angle-right"></i></li>
				<li><a href="#">加班</a></li>
			</ul>
		</div>
	</div>

	<div class="row-fluid">
		<div class="span12">
			<div class="portlet">
				<div class="portlet-title">

					<div class="tools">
						<a class="collapse" href="javascript:;"></a>
					</div>
				</div>
				<div class="portlet-body">
					<c:choose>
						<c:when test="${messageError!=null }">
							<div class="alert alert-error">
								<strong>失败!</strong> ${messageError }
							</div>
						</c:when>
						<c:when test="${messageSuccess!=null }">
							<div class="alert alert-success">
								<strong>成功!</strong> ${messageSuccess }
							</div>
						</c:when>
					</c:choose>
					<form class="form-inline">
						<div class="row-fluid">
							<div class="span2 query">
								<div class="control-group">
									<label class="control-label">&nbsp;</label>

								</div>
							</div>
						</div>
					</form>

				</div>
			</div>
		</div>
	</div>

	<div class="row-fluid">
		<div class="span12">
			<div class="portlet box grey">
				<div class="portlet-title">
				

					<div class="actions">
						<a class="btn green" href="<c:url value="/overtime/add.html"/>"><i
							class="icon-plus"></i> 添加</a>
					</div>

				</div>
				<div class="portlet-body no-more-tables">
					<table class="table table-bordered table-striped table-hover">
						<thead>
							<tr>
								<th>姓名</th>
								<th>部门</th>
								<th>申请日期</th>
								<th>报批类别</th>
								<th>加班类型</th>
								<th>原因</th>
								<th>开始时间</th>
								<th>结束时间</th>
								<th>预计(实际)工作时间</th>
								<th>工作内容</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${dataGrid.rows }" var="row">
								<tr>
									<td data-title="姓名">${row.name}&nbsp;</td>
									<td data-title="部门">${row.dept}&nbsp;</td>
									<td data-title="申请日期">${row.appdate}&nbsp;</td>
									<td data-title="报批类别">${row.approvaltype}&nbsp;</td>
									<td data-title="加班类型">${row.overtimetype}&nbsp;</td>
									<td data-title="原因">${row.cause}&nbsp;</td>
									<td data-title="开始时间">${row.startdate}&nbsp;</td>
									<td data-title="结束时间">${row.enddate}&nbsp;</td>
									<td data-title="预计(实际)工作时间">${row.worktime}&nbsp;</td>

									<td data-title="工作内容">${row.jobcontent}&nbsp;</td>
									<td data-title="状态">${row.state}&nbsp;</td>
									<td data-title="操作"><a
										href="<c:url value="/overtime/${row.id }/edit.html"/>"
										class="btn mini blue"> <i class="icon-edit"></i> 修改
									</a>&nbsp;| <a
										href="<c:url value="/overtime/delete.html?id=${row.id}"/>"
										class="btn mini red delete-confirm"> <i class="icon-trash"></i>
											删除
									</a> <a class="btn mini gray"
										href="<c:url value="/overtime/${row.id }/download.html"/>">
											<i class="icon-long-arrow-down"></i> 导出Excel
									</a></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<p:pagination url="/overtime/list.html" total="${dataGrid.total}" />
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript"
	src="<c:url value="/static/js/commons-confirm.js"/>"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$(".delete-confirm").confirm({
			title : "删除",
			message : "确认删除吗？"
		});
	});
</script>